package Algorithm.AlgorithmBook.ChapterOne;

/**
 * @author 枫城
 * @createTime 2022/10/20 9:03
 * @desc 斐波那契数列简单实现
 */
public class Fibonacci {
    public static void main(String[] args) {
        fn(5);
    }

    public static int fn(int n){
        if (n == 1 || n == 0){
            return 1;
        }else {
            System.out.println("1");
           return fn(n-1) + fn(n-2);
        }
    }

}
